public class ilovejava {    
    public static void main(String[] args) {    
        System.out.println("Result: " + f(1, 2));   
        System.out.println("Result: " + f(-1, -2, -3, -4));  
        System.out.println("Result: " + f(9, 7, 6));  
        System.out.println("Result: " + f(5));   
        System.out.println("Result: " + f()); 
    }     
    public static int f(int... numbers) {    
        int total = 0;    
        for (int number : numbers) {    
            total += number;    
        }    
        return total;    
    }    
}